//
//  ADCustomCell.m
//  JinChengYun
//
//  Created by 金橙云 on 2017/4/11.
//  Copyright © 2017年 金橙云. All rights reserved.
//

#define Active_Width (self.frame.size.width-2)/2
#import "ADCustomCell.h"

@implementation ADCustomCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
       
        _orageLab = [[UILabel alloc] init];
        _orageLab.textColor = [UIColor orangeColor];
        _orageLab.text =@"890314721血dru";
        _orageLab.font = [UIFont systemFontOfSize:12];
        _orageLab.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_orageLab];
        [_orageLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(Active_Width, 20));
            make.top.equalTo(self.mas_top).offset(8);
             make.left.equalTo(self.mas_left).offset(1);
            
            
        }];
        
        UILabel *liLab = [[UILabel alloc] init];
        liLab.backgroundColor = [UIColor grayColor];
        [self addSubview:liLab];
        [liLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(0.5, 40));
            make.centerX.equalTo(self);
        }];
        
        _grayLab = [[UILabel alloc] init];
        _grayLab.textColor = [UIColor blackColor];
        _grayLab.font = [UIFont systemFontOfSize:12];
        _grayLab.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_grayLab];
        [_grayLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(Active_Width, 20));
            make.top.equalTo(self.mas_top).offset(8);
           make.right.equalTo(self.mas_right).offset(-10);
            
        }];
        
        
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
